/*
 * Copyright (c) 2023 Huawei Technologies Co., Ltd.
 * openUBMC is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *         http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 */

#ifndef GEN_OPTICAL_MODULE_INTERFACE_H
#define GEN_OPTICAL_MODULE_INTERFACE_H

#include <device_tree/base.h>

namespace dev::gen {

class MC_API OpticalModule : public mc::engine::interface<OpticalModule> {
public:
    MC_INTERFACE("bmc.dev.OpticalModule")

    property<uint8_t>             Presence;            ///< 光模块在位信息
    property<std::string>         Manufacturer;        ///< 厂商名称
    property<std::string>         PartNumber;          ///< 厂商部件名称
    property<std::string>         SerialNumber;        ///< 厂商序列号
    property<std::string>         ProductionDate;      ///< 生产日期
    property<std::string>         TransceiverType;     ///< 收发器类型
    property<std::string>         FiberConnectionType; ///< 传输模式
    property<std::string>         WaveLengthNanometer; ///< 波长
    property<std::string>         PackagingType;       ///< 光模块封装类型
    property<std::vector<double>> SupportedSpeedsMbps; ///< 支持的速率
    property<std::string>         Identifier;         ///< 光模块的识别码
    property<std::string>         ConnectorType;      ///< 光模块的连接器类型
    property<std::string>         MediumType;         ///< 光模块的介质类型
    property<uint16_t>            TransmissionDistance; ///< 传输距离
    property<std::string>         RevisionNumber;     ///< 产品修订版本号
    property<uint8_t>             ChannelNum;         ///< 光模块内部通道数
    property<uint8_t>             Accessible;         ///< 光模块是否可访问,0为不可访问,1为可访问
};
} // namespace dev::gen

#endif // GEN_OPTICAL_MODULE_INTERFACE_H
